<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>显示隐藏元素之display</title>
    <style>
        div{
            width: 200px;
            height: 200px;
        }
        /* 1 */
        .one {
            display: none;
            /* display: block; */
            background-color: pink;
        }
        .two {
            background-color: skyblue;
        }
        /* 2 */
        .one {
            /* 保留原来的位置 */
            visibility: hidden;
            /* visibility: inherit; */
            background-color: pink;
        }
        .two {
            background-color: skyblue;
        }
        /* 3 */
        .one {
            overflow: hidden;
            /* 溢出隐藏 */
            overflow: scroll;
            /* 滚动隐藏 */
            overflow:auto ;
            /* 需要的时候出现滚动条 */
            background-color: pink;
        }
        .two {
            background-color: skyblue;
        }
    </style>
</head>
<body>
    <div class="one">1</div>
    <div class="two">2</div>
</body>
</html>